package com.hss.rxjava.bean;


import com.hss.rxjava.CheckInterface;
import com.hss.rxjava.StringUtils;

/**
 * Created by zhu_sk on 2016/5/12.
 */
public class BuyerMessage implements CheckInterface {
    private String supplierId; // 商家id
    private String message;// 买家留言 1 周末配送 2 工作日配送

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public boolean check(int index) {
        if(!StringUtils.isNotNull(message))return false;
        if(!StringUtils.isValidate(supplierId))return false;
        return true;
    }

    @Override
    public void fix(int index) {
        message = StringUtils.makeStringNotNull(message);
    }
}
